package com.xxl.job.executor.jobhandler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import com.xxl.job.executor.service.ICountStationMinistryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 统计站--部传输统计报表
 */
@JobHandler(value="countStationMinistryJobHandler")
@Component
public class CountStationMinistryJobHandler extends IJobHandler {

    @Autowired
    private ICountStationMinistryService countStationMinistryService;

    @Override
    public ReturnT<String> execute(String param) throws Exception {
        XxlJobLogger.log("开始执行数据同步任务");

        countStationMinistryService.transfer();

        XxlJobLogger.log("执行数据同步任务结束");
        return SUCCESS;
    }
}
